<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/html">
<!-- manifest="cache.manifest" -->
<head>
    <meta charset="utf-8" />
    <title>免费通话</title>
    <meta name="keywords" content="" />
    <link type="text/css" rel="stylesheet"  href="__CSS__/format_dom.css"/>
    <link type="text/css" rel="stylesheet"  href="__CSS__/main.css"/>
</head>
<body>
<div class="box01">
    <div class="header"><span>{:baomingType($type)}</span></div>
    <form action="{:url('Ajax/addOrder')}" method="post" id="layer_baoming_form">
        <input type="hidden" value="{$type}" name="type" id="type">
        <input type="hidden" value="{$house_id}" name="house_id" id="house_id">
        <input type="hidden" value="house" name="model">
        <div class="cont">
            <p class="mcolor02">请先预留您的联系方式，{$site.title}客户经理将与您联系！</p>
            <ul class="cont_li">
                <li><input name="name" type="text" class="f_input65" id="name" placeholder="请输入您的姓名"></li>
                <li><input name="phone" type="text" class="f_input03" id="phone" placeholder="请输入手机号码"></li>
                <li><input name="memo" type="text" class="f_input67" id="memo" placeholder="备注"></li>
            </ul>
            <p><a href="javascript:;" id="baoming_btn_sub" class="but06">立即提交</a></p>
            <p class="safe">{$site.title}承诺不会以任何形式泄露您的个人信息！</p>
        </div>
    </form>

</div>
<script src="__PUBLIC__/js/jquery.min.js"></script>
<script src="__PUBLIC__/js/layer/layer.js"></script>
<script src="__PUBLIC__/js/plugins/jquery.ajax.form.js"></script>
<script>
    $(function(){
        $('#baoming_btn_sub').bind('click',function(){
            var title = $('#name').val();
            var content = $('#phone').val();
            var reg     = /1[34578][0-9]{9}$/;
            if(title.length==0){
                layer.msg('请填写您的姓名',{icon:2});
                return false;
            }
            if(!reg.test(content)){
                layer.msg('请填写正确的手机号码',{icon:2});
                return false;
            }
            layer.load(1);
            $('#layer_baoming_form').submit();
        });
        $('#layer_baoming_form').ajaxForm({success:complate,dataType:'json'});
        function complate(result){
            if(result.status == 1){
                layer.msg(result.msg,{icon:1});
                setTimeout(function(){
                    var index = parent.layer.getFrameIndex(window.name);
                    parent.layer.close(index);
                },1500);

            } else {
                layer.msg(result.msg,{icon:2});
            }
        }
    });
</script>
</body>
</html>
